package com.yihuan.service;

import com.yihuan.entity.RecStyleEntity;
import com.yihuan.mapper.RecStyleMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Author:梦醒
 * Date: 2022/4/20 20:38
 * Dream:
 * 信言不美，美言不信。
 * 善者不辩，辩者不善。
 * 知者不博，博者不知。
 * Function:
 */
@Service
public class RecStyleService {
    @Resource
    RecStyleMapper recStyleMapper;
    
    /**
     * 回收品类型分页查询数据
     *
     * @param recStyleEntity
     * @return
     */
    public List<RecStyleEntity> findRecStyleByRecStyleList(RecStyleEntity recStyleEntity) {
        return recStyleMapper.findRecStyleByRecStyleList(recStyleEntity);
    }
    
    /**
     * 回收品类型统计分页查询数据
     *
     * @return
     */
    public int countRecStyleList() {
        return recStyleMapper.countRecStyleList();
    }
    
    /**
     * 回收品类型模糊分页查询数据
     *
     * @param recStyleEntity
     * @return
     */
    public List<RecStyleEntity> findRecStyleByRecStyleConcatList(RecStyleEntity recStyleEntity) {
        return recStyleMapper.findRecStyleByRecStyleConcatList(recStyleEntity);
    }
    
    /**
     * 回收品类型模糊统计分页查询数据
     *
     * @return
     */
    public int countRecStyleConcatList(RecStyleEntity recStyleEntity) {
        return recStyleMapper.countRecStyleConcatList(recStyleEntity);
    }
    
    /**
     * 更改回收品类型信息启用状态
     *
     * @param recStyleEntity
     * @return
     */
    public int updateRecStyleByRecStyleState(RecStyleEntity recStyleEntity) {
        return recStyleMapper.updateRecStyleByRecStyleState(recStyleEntity);
    }
    
    /**
     * 更改回收品类型信息名称
     *
     * @param recStyleEntity
     * @return
     */
    public int updateRecStyleByRecStyleName(RecStyleEntity recStyleEntity) {
        return recStyleMapper.updateRecStyleByRecStyleName(recStyleEntity);
    }
    
    /**
     * 查询回收品类型信息名称 按商品类型编号
     *
     * @param recStyleEntity
     * @return
     */
    public List<RecStyleEntity> findRecStyleByRecStyID(RecStyleEntity recStyleEntity) {
        return recStyleMapper.findRecStyleByRecStyID(recStyleEntity);
    }
    
    /**
     * 注册回收品类型信息
     *
     * @param recStyleEntity
     * @return
     */
    public int insertRecStyleByRecStyleData(RecStyleEntity recStyleEntity) {
        return recStyleMapper.insertRecStyleByRecStyleData(recStyleEntity);
    }
    
    /**
     * 查询回收品类型信息名称
     *
     * @return
     */
    public List<RecStyleEntity> findRecStyleByRecStyleData() {
        return recStyleMapper.findRecStyleByRecStyleData();
    }
}
